package ui.swing.scrolling;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;

public class JScrollPaneDemo extends JFrame {

	private static final long serialVersionUID = -5118083898510068575L;

	public JScrollPaneDemo() {
		super("JScrollPane Demo");
		ImageIcon ii = new ImageIcon(getClass().getResource("/resources/images/af.jpg"));
		JScrollPane jsp = new JScrollPane(new JLabel(ii));
		getContentPane().add(jsp);
		setSize(300, 250);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setVisible(true);
	}

	public static void main(String[] args) {
		new JScrollPaneDemo();
	}
}